//
//  AlarmClockViewCell.swift
//  UNHimalayas
//
//  Created by 王水平 on 2019/11/26.
//  Copyright © 2019 HachiTech. All rights reserved.
//

import UIKit

class AlarmClockViewCell: UITableViewCell {
    
    var titleLabel : UILabel!
    var setSwitch : UISwitch!
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        initTitleLabel()
        initSetSwitch()
    }
    
    func initTitleLabel() -> Void {
        
        titleLabel = UILabel()
        titleLabel.backgroundColor = UIColor.clear
        titleLabel.text = "闹铃开关"
        titleLabel.textColor = UIColor.black
        titleLabel.textAlignment = .left
        titleLabel.font = UIFont.systemFont(ofSize: 16)
        self.contentView.addSubview(titleLabel)
        
        titleLabel.snp.makeConstraints { (make) in
            
            make.centerY.right.equalToSuperview()
            make.left.equalToSuperview().offset(kRealWidth(15))
            make.height.equalTo(kRealWidth(20))
        }
    }
    
    func initSetSwitch() -> Void {
        
        setSwitch = UISwitch(frame: CGRect(x: kScreenWidth - 65, y: kRealWidth(10.5), width: 0, height: 0))
        setSwitch.backgroundColor = .clear
        self.contentView.addSubview(setSwitch)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
